/**
 * 鉴权相关api
 */
import {
	http
} from '@/api/service.js'

/**
 * 忘记密码ws
 * @param {Object} params - 忘记密码参数
 */
export const authForgetpassApi = (params) => {
	return http.post('login/forgetpass', {
		params
	})
}

/**
 * 退出登录ws
 * @param {Object} params - 退出登录参数  
 */
export const authLogoutApi = (params) => {
	return http.get('user/logout')
}

/**
 * 验证码ws
 * @param {Object} params - 验证码参数
 */
export const authSMSApi = (params) => {
	return http.post('sms/send', {
		params
	})
}

/**
 * 注册ws
 * @param {Object} params - 注册参数
 */
export const authRegisterApi = (params) => {
	return http.post('login/login', {
		params
	})
}

/**
 * 登录 ws
 * @param {Object} params - 登录参数
 */
export const authLoginApi = (params) => {
	return http.post('login/login',
		params)
}

/**
 * 注销账号
 * @param {Object} params - 注销参数
 */
export const authLogoffApi = (params) => {
	return http.get('user/logoff', {
		params
	})
}

/**
 * 获取协议 
 * @param {Object} params - 获取协议 参数
 */
export const authAgreementApi = (params) => {
	return http.get('user/agreement', {
		params
	})
}